import datetime

class Log:
	def __init__(self):
		self.t=0;
	
	def update(self, s):
		agora = datetime.datetime.now() 
		s=str(agora).split('.')[0] + ": " + s
		print s
		#f = open('/tmp/processador.'+ str(self.t) + '.log', 'a+')
		f = open('/tmp/processador.log', 'a+')
		f.write(s)
		f.close()

	def setThread(self, i):
		self.t=i;
